<section id="main">
	<!--<div class="row-fluid">
		<div class="span12">
			<hr class="main">
			<ul class="breadcrumbs">
				<li><?php echo $this->Html->link('Add site', array('action' => 'add'), array('class' => 'crumb')); ?>
			</ul>
			<hr class="main">
		</div>
	</div>-->
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="box bordered">
					<div class="box inner white">
						<div class="row-fluid padded10">
							<div class="section-title"><?php echo $channel['Channel']['name']; ?></div>
						</div>
						<div class="channels row-fluid">
						<!-- CONTENT -->

	<div class="actions">
		<ul class="nav nav-pills">
			<li><?php echo $this->Html->link('Add new ad', array('action' => 'add', 'controller' => 'ads', $channel['Channel']['id']), array('class' => 'btn dark-blue')); ?></li>
			<li class="pull-right"><?php echo $this->Html->link('Back to sites', array('action' => 'index'), array('class' => 'btn')); ?></li>
		</ul>
	</div><?php if (!empty($channel['Ad'])): ?>
<table class="table">
	<thead>
		<tr>
			<th>Name</th>
			<th>Size</th>
			<th>Position</th>
			<th>Impressions</th>
			<th>Qty</th>
			<th>Cost</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
		<tr>
		<?php foreach ($channel['Ad'] as $ad): ?>
			<td><?php echo $ad['name']; ?></td>
			<td><?php echo $ad['width']; ?> x <?php echo $ad['height']; ?></td>
			<td><?php echo $ad['position']; ?></td>
			<td><?php echo $ad['impressions']; ?></td>
			<td><?php echo $ad['qty']; ?></td>
			<td>U$ <?php echo $ad['cost']; ?></td>
			<td class="actions">
				<div class="btn-group pull-right">
				<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', 'controller' => 'ads', $ad['id']), array('class' => 'btn')); ?>
				<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', 'controller' => 'ads', $ad['id']), array('class' => 'btn'), __('Are you sure you want to delete # %s?', $ad['id'])); ?>
			    </div>
			</td>
		</tr>
		<?php endforeach; ?>
	</tbody>
</table>
<?php else: ?>
<p>No ads created. <?php echo $this->Html->link('Create your first ad format', '/ads/add/'.$channel['Channel']['id']); ?></p>
<?php endif; ?>
		</div>
							<!-- END CONTENT -->
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>
